<html>
<#include  "../common/header.ftl">
<link rel="stylesheet" href="//apps.bdimg.com/libs/jqueryui/1.10.4/css/jquery-ui.min.css">
<script src="//apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="//apps.bdimg.com/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<link rel="stylesheet" href="jqueryui/style.css">
<script>
    $(function() {
        $( ".from" ).datepicker({
            defaultDate: "+1w",
            changeMonth: true,
            numberOfMonths: 2,
            onClose: function( selectedDate ) {
                $( ".to" ).datepicker( "option", "minDate", selectedDate );
            }
        });
        $( ".to" ).datepicker({
            defaultDate: "+1w",
            changeMonth: true,
            numberOfMonths: 2,
            onClose: function( selectedDate ) {
                $( ".from" ).datepicker( "option", "maxDate", selectedDate );
            }
        });
    });
</script>
<body>
<div id="wrapper" class="toggled">

    <!--边栏 -->
<#include  "../common/nav.ftl">

    <!-- 主体内容-->
    <div id="page-content-wrapper">
        <div class="container-fluid">
            <div class="row clearfix">
                <div class="col-md-12 column">
                    <form role="form" method="post" action="/fanZone/seller/coupon/save">

                        <div class="form-group">
                            <label >券名称</label>
                            <input class="form-control" type="text" name="couponName" value="${(tcCoupon.couponName)!''}"/>
                        </div>
                        <div class="form-group">
                            <label >券范围</label>
                            <input class="form-control" type="text" name="couponPrice" value="${(tcCoupon.couponRank)!''}"/>
                        </div>
                        <div class="form-group">
                            <label >库存</label>
                            <input class="form-control" type="number" name="couponStock" value="${(tcCoupon.couponStock)!''}"/>
                        </div>
                        <div class="form-group">
                        <label >单价</label>
                        <input class="form-control" type="text" name="couponStatus" value="${(tcCoupon.couponPrice)!''}"/>
                    </div>
                        <div class="form-group">
                            <label >商家Id</label>
                            <input class="form-control" type="text" name="couponStatus" value="${(tcCoupon.bussinessId)!''}"/>
                        </div>
                        <div class="form-group">
                            <label >活动有效期:</label>
                            <input   type="datetime"   class="from" name="activityDurationStart" value="${(tcCoupon.activityDurationStart)!''}"/>
                            <input   type="datetime"   class="to" name="activityDurationEnd" value="${(tcCoupon.activityDurationEnd)!''}"/>
                        </div>
                        <div class="form-group">
                            <label >消费有效期:</label>
                            <input  type="datetime"   class="from" name="useDurationStart" value="${(tcCoupon.useDurationStart)!''}"/>
                            <input  type="datetime"   class="to"   name="useDurationEnd" value="${(tcCoupon.useDurationEnd)!''}"/>
                        </div>
                        <div class="form-group">
                            <label >图片</label>
                            <img src="${(tcCoupon.couponIcon)!''}" alt="">
                            <input class="form-control" type="text" name="productIcon" value="${(tcCoupon.couponIcon)!''}"/>
                        </div>
                        <div class="form-group">
                            <label >券种类</label>
                            <select name="categoryType" class="form-control">
                                <#list  categoryList as category>
                                    <option value="${category.couponType}"
                                            <#if (tcCoupon.couponType)?? && tcCoupon.couponType==category.couponType>
                                            selected
                                            </#if>
                                >${category.categoryName}</option>
                                </#list>

                            </select>
                             </div>

                        <div class="checkbox">
                            <input hidden type="text" name="productId" value="${(tcCoupon.couponId)!''}">
                        </div> <button type="submit" class="btn btn-default">提交</button>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>